A deep understanding of JAVA's static (combined with the C language) and a deep understanding of static
1 public class statictest {2 3 4 String X = "I am a non-static variable"; 5 6 7 static int butterfly = 0; 8 static String staticX = "I Am a
static denotes "global" or "static" meaning, used to decorate member variables and member methods, or to form static-code blocks, but the concept of global variables is not available in the Java language. The member variables and member methods that
1.static concept Static modifier, what is static modifier? As you know, any variable or code in the program is automatically allocated by the system at compile time to store the memory, and so-called static refers to the memory allocated after
Const, static, extern usage summary, constextern
Const application:
1. For the basic declaration const int r = 100; // standard const variable declaration and initialization, the compiler will directly replace it with 100 during compilation after
Static
A static data type is used to create a permanent storage space for a variable. The statically variable keeps their values unchanged when invoked between functions. When used in a class, all the variables that are used in a static variable
The static modifier can be used with variables and methods, which means "static".Static variables and static methods can be accessed through the class name and do not need to create a class object to access the static members of the class, so the
create another class in one class, called the member inner class. This member inner class can be static (with the static keyword decorated), or it can be non-static. Since static internal classes are defined and used, there are various
1. What is static?Static is a common modifier in C ++. It is used to control the storage and visibility of variables.
2. Why is static introduced?When a variable defined in a function is executed to its definition, the compiler allocates space for
Original blog, reprint please indicate the source--Zhou Xuewei http://www.cnblogs.com/zxouxuewei/Static is used in two ways: static in process-oriented programming and static in object-oriented programming. The former applies to ordinary variables
static denotes "global" or "static" meaning, used to decorate member variables and member methods, or to form static-code blocks, but the concept of global variables is not available in the Java language.
The member variables and member methods
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.